package cn.itsource.domain.es;


import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.maizi.es.annotation.EsField;
import com.maizi.es.annotation.Id;
import com.maizi.es.common.BaseEsEntity;
import lombok.Data;
import org.apache.lucene.document.FieldType;
import org.jboss.logging.Field;

import java.math.BigDecimal;
import java.util.Date;

@Data
//Document 等同于你们的 tkmapper 的 table 等同于mybatisplus tableName
//type 在es7.0之后就取消了 ,默认是_doc es7.6.8以后完全移除 type
public class Pet  implements BaseEsEntity<Pet,Long> {
    //设置新增成功后，返回 自增长主键值
    @Id
    private Long id;
    private Long adoptId;
    //ik_max_word :  细粒度
    //IK_SMART 粗粒度
    @EsField(Fields = EsField.Fields.TEXT, analysis = EsField.Analysis.IK_MAX_WORD)
    private String name;
    @EsField(Fields = EsField.Fields.KEYWORD)
    private String resources;
    @EsField(Fields = EsField.Fields.DOUBLE)
    private BigDecimal saleprice;
    @EsField(Fields = EsField.Fields.DOUBLE)
    private BigDecimal chuxiaoPrice;
    @EsField(Fields = EsField.Fields.DATE)
    //大小写替换 ctrl + shift + U
    private Date offsaletime;
    @EsField(Fields = EsField.Fields.DATE)
    private Date onsaletime;
    private Integer state;
    private Integer age;
    private Date createTime;
    private Long typeId;
    private Long shopId;
    private Long userId;
    private BigDecimal costprice;
    private String resourceType;
    private Boolean del;
    //@Transient
    //PetDetail petDetail;


//    private TPetDetail detail; //关联宠物详情信息


}
